package com.hex.ds.hdrs.log.controller;

import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.common.page.PageData;
import com.hex.ds.hdrs.log.po.MailSendLog;
import com.hex.ds.hdrs.log.service.MailSendLogService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/mailSendLog")
public class MailSendLogController {

    @Autowired
    private MailSendLogService mailSendLogService;

    @ApiOperation("分页查询邮件发送日志信息")
    @GetMapping("/selectPages")
    public ResponseEntity<Object> qryMailSendLog(MailSendLog mailSendLog, Page page) {
        log.debug("进入了【MailSendLogController】的qryMailSendLog方法");
        PageData pageData = new PageData(this.mailSendLogService.qryMailSendLog(mailSendLog, page), page);
        return new ResponseEntity(pageData, HttpStatus.OK);
    }
}
